<template>
	<view>
		<view class="bodyBox" v-for="(item, index) in sortData" :key="item.id">
			<view class="boxTitle">
				{{item.title}}
			</view>
			<view class="line" />
			<view class="boxData">
				<view class="boxDataItem" v-for="(it, idx) in item.data" :key="idx">
					{{it}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "sortItem",
		props: {
			sortData: {
				type: Array,
				default: [],
				required: true
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.bodyBox {
		padding: 10rpx 20rpx;
		margin-bottom: 35rpx;

		.boxTitle {
			height: 45rpx;
			margin-bottom: 15rpx;
		}

		.line {
			width: 100%;
			height: 2px;
			background-color: #DB191B;
			border-right: 600rpx solid #DEDEDE;
			border-radius: 20rpx;
			margin-bottom: 10rpx;
		}

		.boxData {
			display: grid;
			grid-template-columns: repeat(3, 1fr);
			gap: 8rpx;

			.boxDataItem {
				width: 180rpx;
				height: 50rpx;
				background-color: white;
				margin: 10rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				border-radius: 30rpx;
				font-size: 22rpx;
			}
		}
	}
</style>